package com.neko.seed.api.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.*;

import org.springframework.data.annotation.Transient;

public class BasePo {
  public final static String DEFAULT_USERNAME = "system";
  @TableId(type = IdType.UUID)
  private String id;

  @TableField(fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date createdTime = new Date();

  @TableField(fill = FieldFill.INSERT)
  private String createdBy = "system";

  @TableField(fill = FieldFill.INSERT)
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date updatedTime = new Date();

  @TableField(fill = FieldFill.INSERT)
  private String updatedBy = "system";

  @TableField(fill = FieldFill.INSERT)
  private Integer deleted = 0;

  @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
  @Transient
  @TableField(exist = false)
  private int page;

  @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
  @Transient
  @TableField(exist = false)
  private int limit;
}
